package org.gdtc.storefront.service;

import org.gdtc.storefront.entity.Problemcommodity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@RequestMapping("/ProblemcommodityService")
public interface ProblemcommodityService {
    @RequestMapping("/deleteByPrimaryKey")
    int deleteByPrimaryKey(Integer id);
    @RequestMapping("/insert")
    int insert(Problemcommodity record);
    @RequestMapping("/selectByPrimaryKey")
    Problemcommodity selectByPrimaryKey(Integer id);
    @RequestMapping("/selectAll")
    List<Problemcommodity> selectAll();
    @RequestMapping("/updateByPrimaryKey")
    int updateByPrimaryKey(Problemcommodity record);
    @RequestMapping("/InsProblem")
    int InsProblem(@RequestParam("storeid") Integer storeid,
                   @RequestParam("commodityid") Integer commodityid,
                   @RequestParam("saleafterid") Integer saleafterid,
                   @RequestParam("stock") Integer stock,
                   @RequestParam("jointime") String jointime,
                   @RequestParam("because") String because,
                   @RequestParam("orderid") Integer orderid);

    @RequestMapping("/QueryProblemtoState")
    List<Problemcommodity> QueryProblemtoState(@RequestParam("storeid") Integer storeid);

    @RequestMapping("/UpdProblemtoState")
    int UpdProblemtoState(@RequestParam("state") Integer state,
                          @RequestParam("id") Integer id);
    @RequestMapping("/QueryStock")
    int QueryStock(@RequestParam("id") Integer id);
    @RequestMapping("/QueryCommtoStock")
    int QueryCommtoStock(@RequestParam("id") Integer id);
    @RequestMapping("/QueryCommodityId")
    int QueryCommodityId(@RequestParam("id") Integer id);

    @RequestMapping("/QueryProblemtoone")
    List<Problemcommodity> QueryProblemtoone(@RequestParam("state") Integer state,
                                             @RequestParam("storeid") Integer storeid);

}
